#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};

import com.ruoyi.common.core.utils.ip.IpUtils;
import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * 启动类
 *
 * @author ruoyi
 * @date 2022-02-15 10:59:29
 */
@EnableCustomConfig
@EnableRyFeignClients
@SpringBootApplication(scanBasePackages = {"${groupId}"})
@Slf4j
@EnableDiscoveryClient
public class CenterBootstrap {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(CenterBootstrap.class, args);
        Environment environment = context.getBean(Environment.class);
        log.info("中台中心启动成功，接口文档地址：http://" + IpUtils.getHostIp() + ":"
                + environment.getProperty("server.port") + "/doc.html");
        log.info("(♥◠‿◠)ﾉﾞ  中台中心启动成功   ლ(´ڡ`ლ)ﾞ  ${symbol_escape}n" +
                " .-------.       ____     __        ${symbol_escape}n" +
                " |  _ _   ${symbol_escape}${symbol_escape}      ${symbol_escape}${symbol_escape}   ${symbol_escape}${symbol_escape}   /  /    ${symbol_escape}n" +
                " | ( ' )  |       ${symbol_escape}${symbol_escape}  _. /  '       ${symbol_escape}n" +
                " |(_ o _) /        _( )_ .'         ${symbol_escape}n" +
                " | (_,_).' __  ___(_ o _)'          ${symbol_escape}n" +
                " |  |${symbol_escape}${symbol_escape} ${symbol_escape}${symbol_escape}  |  ||   |(_,_)'         ${symbol_escape}n" +
                " |  | ${symbol_escape}${symbol_escape} `'   /|   `-'  /           ${symbol_escape}n" +
                " |  |  ${symbol_escape}${symbol_escape}    /  ${symbol_escape}${symbol_escape}      /           ${symbol_escape}n" +
                " ''-'   `'-'    `-..-'              ");
    }
}
